#include "ThreadCache.hpp"
#include <unistd.h>
void ThreadFunc()
{
    if(pTLSThreadCache == nullptr)
    {
        pTLSThreadCache = new ThreadCache;
    }
    std::cout << std::this_thread::get_id() << " : " << pTLSThreadCache << std::endl;
    for(int i = 0 ; i < 5 ; ++i)
    {
        pTLSThreadCache->Allocate(5);
    }

}

int main()
{
    std::thread t1(ThreadFunc);
    sleep(1);
    std::thread t2(ThreadFunc);
    t1.join();
    
    t2.join();
    return 0;
}